Project ID | FD17E29641C6117580258994003AF3B0 |
Version | 3 |
Class ID | A475383223E512AF802589940051489B |
Class Type | Base |
Attributes |
comparator (Get) As Comparator |
contentType (Get) As String |
elementCount (Get) As Long |
hasContent (Get) As Boolean |
isLocked (Get) As Boolean |
isSorted (Get) As Boolean |
suppressErrors (Get) As Boolean |
suppressErrors (Set) As Boolean |
clone() As Map |
collectKeys() As Collection |
collectValues(targetColl As Collection) As Collection |
contains(checkValue As Variant, valueComparator As Comparator) As Boolean |
containsKey(keyVal As Variant) As Boolean |
filter(filterObj As MapFilter) As Map |
getAndRemoveFirstPair() As Pair |
getAndRemoveLastPair() As Pair |
getNthKeyRaw(index As Long) As Variant |
getNthPair(index As Long) As Pair |
getNthValueRaw(index As Long) As Variant |
getValueRawByKey(keyVal As Variant) As Variant |
put(key As Variant, value As Variant) As Long |
putAll(source As Map) As Map |
putPair(content As Pair) As Long |
removeByKey(keyVal As Variant) As Boolean |
removeByValue(value As Variant, allMatches As Boolean, valueComparator As Comparator) As Boolean |
toJson() As JsonObject |
clear() |
fromJson(jsonObj As JsonObject) |
lock() |
New(contentType As String, keyComparator As Comparator, isSorted As Boolean) |
reverse() |
transform(transformer As MapTransformer, newMap As Map) |
unlock() |
%REM
The following code filters out values that are odd numbers
%END REM
Class EvenFilter as MapFilter
Function filter(kvPair as Pair) as Boolean
Dim value as Integer
value = kvPair.value
Return value Mod 2 = 0
End Function
End Class
Dim map as New Map("INTEGER", Nothing, False)
Dim ef as New EvenFilter
Dim map2 as Map
Call map.put("Elem1", 1)
Call map.put("Elem2", 2)
Call map.put("Elem3", 3)
Call map.put("Elem4", 4)
Set map2 = map.filter(ef)
Print map2.elementCount
Public Function clone() As Map | ||||
---|---|---|---|---|
Creates a clone of the Map. | ||||
Code Sample | ||||
Dim map1 as New Map("STRING", Nothing, False) |
Copyright © HCL America, Inc. 1999, 2023. All Rights Reserved.